﻿@page "/basic/crypto/list"

@using HentaiBlazor.Data.Basic

<PageContainer Title="解压密码">

    <Space Style="margin-bottom: 0.5rem">
        <SpaceItem>
            <Input Prefix="@_filter" Placeholder="关键字" Style="width: 12rem;"
                   @bind-Value="searchKeyword" />
        </SpaceItem>
        <SpaceItem>
            <Button Type="@ButtonType.Primary" @onclick="Search">查询</Button>
            <Button Type="@ButtonType.Primary" OnClick="() => OpenEdit(null)">添加</Button>
        </SpaceItem>
    </Space>

    <Table TItem="BCryptoEntity" DataSource="@CCryptoEntities" Size=@TableSize.Small>
        <ActionColumn Width="160">
            <Space>
                <SpaceItem>
                    <Button Type="@ButtonType.Primary" Danger OnClick="() => OpenRemove(context.Id)">删除</Button>
                    <Button Type="@ButtonType.Primary" OnClick="() => OpenEdit(context.Id)">修改</Button>
                </SpaceItem>
            </Space>
        </ActionColumn>
        <Column Title="密码" @bind-Field="@context.Secret"></Column>
        <Column Title="备注" @bind-Field="@context.Note"></Column>
    </Table>
</PageContainer>

@code {
    RenderFragment _filter =@<Icon Type="filter" />;
}